﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DiaryPlanner.Diary
{
    public partial class new_diary : Form
    {
        Diary_main object_diary_main;//Diary_main의 object를 생성

        public new_diary(Diary_main diary_main)
        {
            InitializeComponent();
            object_diary_main = diary_main;
        }

        private void button1_Click(object sender, EventArgs e)
        {
            object_diary_main.write_text_value(this.textBox1);
            this.Close();
        }

        ////////////////////////////////////////////////////////////////
        ////////////////text의 alignment를 수정해주는 이벤트
        
        private void pictureBox1_Click(object sender, EventArgs e)
        {
            this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Left;
            
        }

        private void pictureBox2_Click(object sender, EventArgs e)
        {
            this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
        }

        private void pictureBox3_Click(object sender, EventArgs e)
        {
            this.textBox1.TextAlign = System.Windows.Forms.HorizontalAlignment.Right;
        }
        ////////////////////////////////////////////////////////////////

        ////////////////////////////////////////////////////////////////
        ////////////////////사진 or 그리기 기능 추가시 그기능을 불러오기 위한 이벤트
        private void button2_Click(object sender, EventArgs e)
        {
            Diary.Form1 ex_form = new Form1();
            ex_form.ShowDialog();
        }

 
        
    }
}
